import ShoppingLogin
import ShoppingRegister
import ShoppingHome
from Utils import ShoppingDriver

if __name__ == "__main__":
    try:
        print("测试开始")

        ShoppingRegister.ShoppingRegister().RegisterFail() # 注册失败
        ShoppingHome.ShoppingHome().ShoppingHomeNotLogin()  # 未登录状态下的首页
        #ShoppingRegister.ShoppingRegister().RegisterSuccess() # 注册成功
        ShoppingLogin.ShoppingLogin().LoginSuccess()# 登录成功
        ShoppingHome.ShoppingHome().ShoppingHomeCheckByLogin()  #登录状态下的首页验证
        ShoppingHome.ShoppingHome().Handle_person() # 首页的个人中心交互
        ShoppingHome.ShoppingHome().Handle_goods() # 首页的商品交互

        print("测试结束")
    except:
        print("测试失败")
    finally:
        #测试完成后退出浏览器
        ShoppingDriver.driver.quit()
